package com.liu.community.enums;/*
 *@Author:Liu Xing-zhi
 *Description:
 *Date:Crated in 18:42 2021/10/16
 */

public enum NotificationTypeEnum {
    REPLY_QUESTION(1,"回复了  问题"),
    REPLY_COMMENT(2,"回复了  评论"),
    REPLY_BLOG(3,"回复了  博客"),
    REPLY_BLOG_COMMENT(4,"回复了  博客评论");

    private  Integer type;
    private  String name;

    NotificationTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public  static  String nameOfTtype(Integer type){
        for (NotificationTypeEnum value : NotificationTypeEnum.values()) {
            if (value.getType() == type){
                return  value.getName();
            }
        }
        return  "";
    }
}
